<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

  <link href="Styles/potralIndex.css" rel="stylesheet" type="text/css">
  <script type="text/javascript" src="Js/jquery.min.js" ></script>
  
  <script type="text/javascript" src="Js/index/index.js"></script>
  
</head>

<body>
    <div class="main">
        <!--头部-->
        <div class="top">
            <!--left-->
            <div class="top_left">
                <div class="tu_1">
                    <img src="Images/4.png"/>
                </div>
                <div class="word_1">
                    <span><strong>Lmyau's</strong></span>
                    <span><strong>Blog</strong></span>
                </div>
            </div>

            <!--middle-->
            <div class="top_middle">
                <ul>
                    <li><a href="index">博客</a></li>
                    <li><a href="aboutme">关于我</a></li>
                    <li><a href="connect">和我联系</a></li>
                </ul>
            </div>
            <!--right-->
            <div class="top_right">
		               <!--  <input type="text" name="name">
		                <div></div> -->
                <form action="categoryname">
                	<input class="shuru" type="text" name="title">
	               <!--  <div></div> -->
	               <input class="sub" type="submit" value="  ">
                </form>
                
            </div>
        </div>
        <!--主体部分-->
        <div class="tail">
            <div class="tail_content">
                <!--主体左边部分-->
                <div class="tail_left">
                    <div class="type">
                        <span>博客分类</span>
                    </div>
                    <div class="type_content">
                       <ul>
                       	  <c:forEach items="${caterogyList}" var="category">
                             <li><a href="blog?id=${category.id}">${category.name}</a></li>
	                      </c:forEach>
                       </ul>
                    </div>
                    <div class="type">
                        <span>关于博主</span>
                    </div>
                    <div class="author">
                        <div class="author_img">
                            <img src="Images/5.jpg">
                            <div class="common"><span>姓名：</span><span>${user.name}</span></div> 
                            <div class="common"><span>出生日期：</span><span><fmt:formatDate pattern="yyyy-MM-dd" value="${user.birthday}"/></span></div>
                            <div class="common"><span>星座：</span><span>${user.constellation}</span></div>
                            <div class="common"><span>现居城市：</span><span>${user.city}</span></div>
                            <div class="common"><span>爱好：</span><span>${user.hobby}</span></div>
                        </div>
                    </div>
                </div>
                <!--主体左边部分结束-->

                <!--主体右边部分-->
                <div class="tail_right">
                
                  <c:forEach items="${blogVoList}" var="blog">
                    <div class="msg">
                        <div class="msg_top">
                            <span><a href="detail?id=${blog.id}">${blog.title }</a></span>
                        </div> 
                        <div class="msg_middle">
                            <span>发布日期：</span><span><fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${blog.updated}"/></span>&nbsp;&nbsp;&nbsp;&nbsp;
                            <span>分类：</span><span>${blog.categoryName}</span>
                        </div>
                        <div class="msg_bottom">
                            <p>${blog.content}</p>
                        </div>
                        <a href="detail?id=${blog.id}" class="more">阅读更多</a>
                    </div>
			     </c:forEach>

               </div>
                <!--主体右边部分结束-->
            </div>
        </div>
    	
    	
    	
    </div>

</body>
</html>